package com.yonyou.cyxdms.sysmanage.client.domains.dto;

import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;

import java.io.Serializable;


/**
 * <p>
 *
 * </p>
 *
 * @author duxiaoguang
 * @since 2019-09-04
 */

public class MsgRecordDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 消息id
     */
    private Integer msgId;

    private String appId;
    /**
     * 消息类型
     */
    private String msgType;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 消息code(通知tz)
     */
    private String msgCode;
    /**
     * 消息内容
     */
    private String msgTitle;
    /**
     * 消息内容
     */
    private String msgContent;

    /**
     * TEMPLATE_CODE
     */
    private Integer templateCode;
    /**
     * 公告来源
     */
    private Integer msgNoticeSource;
    /**
     * 公告时间
     */
    private String msgNoticeTime;
    /**
     * 发送人
     */
    private String msgSender;
    /**
     * 接收人
     */
    private String msgReceiver;
    /**
     * url
     */
    private String tzUrl;

    private Integer companyId;

    private Integer msgStatus;
    private Integer noticeRead;     //阅读状态
    private Integer noticeConfirm;  //是否需要确认
    private Integer noticeConfirm1;//确认状态
    private Integer isDeleted;
    /**
     * 创建时间
     */
    private String createdAt;
    /**
     * 创建时间(发布时间)
     */
    private String beginTime;
    /**
     * 结束时间(发布时间)
     */
    private String endTime;


    /**
     * 创建时间(保存时间)
     */
    private String beginTime1;
    /**
     * 结束时间(保存时间)
     */
    private String endTime1;

    private String updatedAt;
    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 修改人
     */
    private String updateBy;

    public String getBeginTime1() {
        return beginTime1;
    }

    @Override
    public String toString() {
        return "MsgRecordDTO{" +
                "msgId=" + msgId +
                ", appId='" + appId + '\'' +
                ", msgType='" + msgType + '\'' +
                ", userId=" + userId +
                ", msgCode='" + msgCode + '\'' +
                ", msgTitle='" + msgTitle + '\'' +
                ", msgContent='" + msgContent + '\'' +
                ", templateCode=" + templateCode +
                ", msgNoticeSource=" + msgNoticeSource +
                ", msgNoticeTime='" + msgNoticeTime + '\'' +
                ", msgSender='" + msgSender + '\'' +
                ", msgReceiver='" + msgReceiver + '\'' +
                ", tzUrl='" + tzUrl + '\'' +
                ", companyId=" + companyId +
                ", msgStatus=" + msgStatus +
                ", noticeRead=" + noticeRead +
                ", noticeConfirm=" + noticeConfirm +
                ", noticeConfirm1=" + noticeConfirm1 +
                ", isDeleted=" + isDeleted +
                ", createdAt='" + createdAt + '\'' +
                ", beginTime='" + beginTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", beginTime1='" + beginTime1 + '\'' +
                ", endTime1='" + endTime1 + '\'' +
                ", updatedAt='" + updatedAt + '\'' +
                ", createdBy='" + createdBy + '\'' +
                ", updateBy='" + updateBy + '\'' +
                '}';
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public void setBeginTime1(String beginTime1) {
        this.beginTime1 = beginTime1;
    }

    public String getEndTime1() {
        return endTime1;
    }

    public void setEndTime1(String endTime1) {
        this.endTime1 = endTime1;
    }

    public Integer getNoticeConfirm1() {
        return noticeConfirm1;
    }

    public void setNoticeConfirm1(Integer noticeConfirm1) {
        this.noticeConfirm1 = noticeConfirm1;
    }

    public Integer getNoticeRead() {
        return noticeRead;
    }

    public void setNoticeRead(Integer noticeRead) {
        this.noticeRead = noticeRead;
    }

    public Integer getNoticeConfirm() {
        return noticeConfirm;
    }

    public void setNoticeConfirm(Integer noticeConfirm) {
        this.noticeConfirm = noticeConfirm;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public MsgRecordDTO() {
        super();
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getTzUrl() {
        return tzUrl;
    }

    public void setTzUrl(String tzUrl) {
        this.tzUrl = tzUrl;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Integer getMsgStatus() {
        return msgStatus;
    }

    public void setMsgStatus(Integer msgStatus) {
        this.msgStatus = msgStatus;
    }

    public Integer getTemplateCode() {
        return templateCode;
    }

    public String getMsgTitle() {
        return msgTitle;
    }

    public void setMsgTitle(String msgTitle) {
        this.msgTitle = msgTitle;
    }

    public Integer getMsgNoticeSource() {
        return msgNoticeSource;
    }

    public void setMsgNoticeSource(Integer msgNoticeSource) {
        this.msgNoticeSource = msgNoticeSource;
    }

    public String getMsgNoticeTime() {
        return msgNoticeTime;
    }

    public void setMsgNoticeTime(String msgNoticeTime) {
        this.msgNoticeTime = msgNoticeTime;
    }

    public void setTemplateCode(Integer templateCode) {
        this.templateCode = templateCode;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getMsgCode() {
        return msgCode;
    }

    public void setMsgCode(String msgCode) {
        this.msgCode = msgCode;
    }

    public String getMsgContent() {
        return msgContent;
    }

    public void setMsgContent(String msgContent) {
        this.msgContent = msgContent;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(String updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Integer getMsgId() {
        return msgId;
    }


    public void setMsgId(Integer msgId) {
        this.msgId = msgId;
    }


    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getMsgSender() {
        return msgSender;
    }


    public void setMsgSender(String msgSender) {
        this.msgSender = msgSender;
    }


    public String getMsgReceiver() {
        return msgReceiver;
    }


    public void setMsgReceiver(String msgReceiver) {
        this.msgReceiver = msgReceiver;
    }


    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author duxiaoguang
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author duxiaoguang
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "msgId");
    }

}
